function res = DoubleGauss(p,x)
%     res = p(1)*exp(-(x - p(2)).^2 ./ (2*p(3))) + x*p(4) + p(5);
    res = p(1)*exp(-(x - p(2)).^2 ./ (2*(p(3).^2))) + ...
        p(4)*exp(-(x - p(5)).^2 ./ (2*(p(6).^2))) + p(7);
end